package com.pzh.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pzh.usercenter.model.domain.Team;
import com.pzh.usercenter.model.domain.User;
import com.pzh.usercenter.model.dto.TeamQuery;
import com.pzh.usercenter.model.request.JoinTeamRequest;
import com.pzh.usercenter.model.request.QuitTeamRequest;
import com.pzh.usercenter.model.request.TeamUpdateRequest;
import com.pzh.usercenter.model.vo.TeamUserVO;

import java.util.List;

/**
* @author fc3379757631
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2025-04-06 19:22:07
*/
public interface TeamService extends IService<Team> {

    /**
     * 创建队伍
     * @param team
     * @param loginUser
     * @return
     */
    Long addTeam(Team team, User loginUser);

    /**
     * 查询队伍
     * @param teamQuery
     * @return
     */
    List<TeamUserVO> listTeams(TeamQuery teamQuery,boolean isAdmin);

    /**
     * 更新队伍
     * @param teamUpdateRequest
     * @param loginUser
     * @return
     */
    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    /**
     * 加入队伍
     * @param joinTeamRequest
     * @param loginUser
     * @return
     */
    boolean joinTeam(JoinTeamRequest joinTeamRequest, User loginUser);

    /**
     * 退出队伍
     * @param quitTeamRequest
     * @param loginUser
     * @return
     */
    boolean quitTeam(QuitTeamRequest quitTeamRequest, User loginUser);

    boolean deleteTeam(long teamId,User loginUser);
}
